package com.topNews.base.exception;

import com.topNews.base.constant.Constants;

public class SystemException extends RuntimeException {

	private static final long serialVersionUID = 1162908528619026887L;

	private String key;

	private Object[] values;

	public SystemException(String key) {
		this(key, null);
	}	
	public SystemException(Object[] values) {
		this(Constants.ERRORS_DETAIL_KEY, values);
	}

	public SystemException(Throwable cause) {
		this(Constants.ERRORS_DETAIL_KEY, new String[] { cause.getMessage() });
	}
	public SystemException(String key, Object[] values) {
		this.key = key;
		this.values = values;
	}

	public String getKey() {
		return key;
	}

	public Object[] getValues() {
		return values;
	}
}
